using System;
using System.Collections.Generic;
using MongoDB.Bson.Serialization.Attributes;

namespace AgentListener.Model.Database
{
    internal class Agent : MongoObject
    {
        internal class ActionFrequency
        {
            public decimal Send { get; set; }
            public decimal Sync { get; set; }
        }

        public string UserId { get; set; }
        public string SysId { get; set; }
        public string Name { get; set; }
        public AgentState Status { get; set; }
        public List<string> Location { get; set; }
        public string Version { get; set; }
        public DateTime LastSendDate { get; set; }
        public DateTime LastSyncDate { get; set; }
        public ActionFrequency Frequency { get; set; }
        public string HostName { get; set; }
        public List<Metric> Metrics { get; set; }
        public string Address4 { get; set; }
        public DateTime RegisterDate { get; set; }
        public bool Registered { get; set; }

        [BsonIgnore]
        public string AgentId { get { return Id.ToString(); } }
    }
}